﻿using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.AspNetCore.Mvc;
using System.Text.Encodings.Web;
using System.Text.Unicode;
using My.Framework.AspNetCore;
using My.Core.Startup;
using My.Core.Jwt;
using My.Core.Swagger;
using My.Core.IOC;
using My.Core.DynamicWebApi;
using My.Core.IPRate;
using My.Core.SignalR;
using My.Core.JobTasks;
using My.Core.Authorization;
using My.Core.UnifyResult;
namespace My.Admin
{
    /// <summary>
    /// 程序启动器
    /// </summary>
    [DependsOn<
        CorsAccessorStartup,
		IPRateStartup,
		AuthenticationStartup,
		AuthorizationStartup,
		SwaggerStartup,
		UnifyResultStartup,
		CoreAutoRegisterIOCStartup,
		DynamicWebApiStartup,
		SignalRStartup,
		JobTasksStartup,
		MapsterStartup,
		EndStartup>]
    public class ApiAdminStartup : AppStartupBaseCore<ApiAdminStartup>
    {
		/// <summary>
		/// 程序启动器
		/// </summary>
		public ApiAdminStartup() => Order = 2;

		/// <summary>
		/// 配置服务
		/// </summary>
		/// <param name="webApplicationBuilder"></param>
		public override void ConfigureServices(WebApplicationBuilder webApplicationBuilder)
        {
			Console.WriteLine("ApiAdminStartup");
			base.ConfigureServices(webApplicationBuilder);
        }

		/// <summary>
		/// 配置
		/// </summary>
		/// <param name="webApplication"></param>
		public override void Configure(WebApplication webApplication)
        {
            base.Configure(webApplication);
        }

		/// <summary>
		/// 程序启动 可以获取程序启动 urls
		/// </summary>
		/// <param name="webApplication"></param>
		public override void ApplicationStarted(WebApplication webApplication)
        {
            base.ApplicationStarted(webApplication);
        }

		/// <summary>
		/// 程序停止中
		/// </summary>
		/// <param name="webApplication"></param>
		public override void ApplicationStopping(WebApplication webApplication)
		{
			base.ApplicationStopping(webApplication);
		}

		/// <summary>
		/// 程序已经停止
		/// </summary>
		/// <param name="webApplication"></param>
		public override void ApplicationStopped(WebApplication webApplication)
		{
			base.ApplicationStopped(webApplication);
		}
	}
}
